<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>用户管理</title>
	<link href="${ctx}/skin/default/css/edar.css" type="text/css" rel="stylesheet"/>
	<script src="${ctx}/script/common.js"></script>
	<script src="${ctx}/script/jquery-1.4.2.js"></script>
	<script language="javascript" defer="defer">
	function goNew(){
		document.location.href="account-input.action";
	}
	function goEdit(){
		var chkboxarr = $("input[name='key']:checked");
		if(chkboxarr.size()==0){
			alert("未选择任何用户!");
			return;
		}else if(chkboxarr.size()>1){
			alert("只能选择一个用户!");
			return;
		}
		document.location.href="account-input.action?account.accountId="+chkboxarr[0].value;
	}
	function goDel(){
		if($("input[name='key']:checked").size()==0){
			alert("未选择任何用户!");
			return;
		}
		if(confirm("确定要删除已选中的内容吗？"))
			$("#form").submit();
	}
	function go(page){
		var url = GetNoPageUrl();
		if(typeof(page) != "undefined"){
			$("#ctrl_page_input").val(page);
		}else{
			if($("#ctrl_page_input").val()==""){
				alert("请输入页码!");
				$("#ctrl_page_input").focus();
				return;
			}
			if(!IsInt($("#ctrl_page_input").val())){
				alert("请输入正整数!");
				$("#ctrl_page_input").focus();
				return;
			}
		}
		document.forms[0].action=filterUrl(url);
		document.forms[0].submit();
	}
	function search(){
		var url = GetNoPageUrl();
		alert(filterUrl(url));
		document.forms[0].action=filterUrl(url);
		document.forms[0].submit();
	}
	$(function(){
		$("#top_new_accountd_btn").click(goNew);
		$("#bottom_new_accountd_btn").click(goNew);
		$("#top_edit_accountd_btn").click(goEdit);
		$("#bottom_edit_accountd_btn").click(goEdit);
		$("#top_del_accountd_btn").click(goDel);
		$("#bottom_del_accountd_btn").click(goDel);
		$("#search_btn").click(search);
	});
	</script>
</head>
<body>
<s:form action="account-delete" id="form">
<div class="total_another">
<table border="0" cellspacing="0" cellpadding="0" class="table">
    <tr>
      <th colspan="4">用户查询</th>
    </tr>
    <tr>
      <td class="table_find">帐号<s:textfield name="account.name" label=""/></td>
      <td class="table_find">手机<s:textfield name="account.mobile"/></td>
      <td class="table_find">姓名<s:textfield name="account.email"/></td>
      <td class="table_find_right"><input id="search_btn" name="" type="button" value="搜索" class="wd1 btn" /></td>
    </tr>
    <tr>
    <td colspan="4">
    <s:fielderror/>
    </td>
    </tr>
  </table>
  <div class="toolbg toolbgline toolheight nowrap">
	<div class="right"><edar:page numberNav="true"/></div>
  	<div class="nowarp left">
	    <input id="top_new_accountd_btn" type="button" value="新建用户" class="wd3 btn"/>
	    <input id="top_edit_accountd_btn" type="button" value="编辑" class="wd1 btn"/>
	    <input id="top_del_accountd_btn" type="button" value="删除" class="wd1 btn"/>
	  <div id="markContainer" name="markContainer" style="float:left;width:80px;margin:2px 0 0 1px;"></div>
	  <div id="selmContainer" name="selmContainer" style="float:left;width:80px;margin:2px 6px 0 8px;_margin:2px 0 0 1px;"></div>
	  </div>
		<div class="clr">&nbsp;</div>
  </div>
<table border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;width:100%;*width:auto;" class="O2">
    <tr>
      <td style="padding:1px 0 1px 5px;"  width="27"><input type="checkbox" onclick="getTop().selectAll(this.checked,document);" title="选中/取消选中" /></td>
      <td class="o_title2">帐号</td>
      <td class="o_title2">手机</td>
      <td class="o_title2">姓名</td>
    </tr>
</table>
<div class="toarea">
   	<s:iterator value="page.result">
   	<table cellspacing="0" cellpadding="0" style="table-layout:fixed;width:100%;*width:auto;" class="i M">
	<tr>
		<td class="cx"><input type="checkbox" name="key" value="<s:property value="accountId"/>"/></td>
		<td class="l"><s:property value="name"/>&nbsp;</td>
		<td class="l"><s:property value="mobile"/>&nbsp;</td>
		<td class="l"><s:property value="name"/>&nbsp;</td>
	</tr>
	</table>
	</s:iterator>
</div>
<div class="list_btline">
  <div style="height:19px;*height:24px;padding-top:5px;*padding-top:3px"  class="f_size selbar_bt barspace2"><span class="addrtitle">选择：</span>&nbsp;<a href="javascript:''" onClick="getTop().selectAll(true,document);getTop().checkAll('mailid',document);return false;">全部</a>&nbsp;-&nbsp;<a href="javascript:''" onClick="getTop().selectAll(false,document);getTop().checkAll('mailid',document);return false;">无</a></div>
</div>
<div class="toolbg toolbgline toolheight nowrap">
  <div class="right"><edar:page numberNav="true" selectPageSize="true" input="true" id="ctrl"/></div>
  	<div class="nowarp left">
    <input id="bottom_new_accountd_btn" type="button" value="新建用户" class="wd3 btn"/>
    <input id="bottom_edit_accountd_btn" type="button" value="编辑" class="wd1 btn"/>
    <input id="bottom_del_accountd_btn" type="button" value="删除" class="wd1 btn"/>
  <div id="markContainer" name="markContainer" style="float:left;width:80px;margin:2px 0 0 1px;"></div>
  <div id="selmContainer" name="selmContainer" style="float:left;width:80px;margin:2px 6px 0 8px;_margin:2px 0 0 1px;"></div>
  </div>
	<div class="clr">&nbsp;</div>
</div>
</div>
</s:form>
</body>
</html>
